<!--{eval $_G['home_tpl_titles'] = array($album['albumname'], '{lang album}');}-->
<!--{eval $friendsname = array(1 => '{lang friendname_1}',2 => '{lang friendname_2}',3 => '{lang friendname_3}',4 => '{lang friendname_4}');}-->

<!--{if empty($diymode)}-->
	<!--{template common/header}-->

	<div id="pt" class="bm cl">
		<!--{subtemplate common/simplesearchform}-->
		<div class="z">
			<a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em>
			<a href="home.php">$_G[setting][navs][4][navname]</a> <em>&rsaquo;</em> 
			<a href="home.php?mod=space&do=album">{lang album}</a> <em>&rsaquo;</em> 
			<a href="home.php?mod=space&uid=$space[uid]&do=album&view=me">{$space[username]}{lang somebody_album}</a>
		</div>
	</div>

	<style id="diy_style" type="text/css"></style>
	<div class="wp">
		<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
	</div>

	<div id="ct" class="ct2_a wp cl">
		<div class="mn">
			<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->
			<div class="bm bw0">
					<!--{if $space[self]}-->
						<h1 class="mt"><img alt="album" src="{STATICURL}image/feed/album.gif" class="vm" /> {lang album} - $album[albumname]</h1>
						<ul class="tb cl">
							<li$actives[we]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=we">{lang friend_album}</a></li>
							<li$actives[me]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=me">{lang my_album}</a></li>
							<li$actives[all]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=all">{lang view_all}</a></li>
							<li class="o"><a href="home.php?mod=spacecp&ac=upload&albumid=$album[albumid]">{lang upload_pic}</a></li>
							<!--{if $_G[referer]}-->
							<li class="y"><a href="$_G[referer]">&laquo; {lang previous_page}</a></li>
							<!--{/if}-->
						</ul>
					<!--{else}-->
						{eval 
							$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=album&view=me\">{lang they_album}</a>";
							$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=album&id=$_GET[id]\">$album[albumname]</a>";
						}
						<!--{template home/space_menu}-->
						<hr class="l m0" />
					<!--{/if}-->
<!--{else}-->
	<!--{template home/space_header}-->
	<div id="ct" class="ct2 wp cl">
		<div class="mn">
				<div class="bm">
				<div class="bm_h cl">
					<h1 class="mt">{lang album}<span class="xs1 xw0">( <a href="home.php?mod=spacecp&ac=upload">{lang upload_pic}</a> )</span></h1>
				</div>
				<div class="bm_c">
<!--{/if}-->

				<div class="tbmu cl">
				<!--{if $album[albumid]>0}-->
				<a href="home.php?mod=spacecp&ac=favorite&type=album&id=$album[albumid]&spaceuid=$space[uid]&handlekey=sharealbumhk_{$album[albumid]}" id="a_favorite" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr ofav">{lang favorite}</a>
				<a href="home.php?mod=spacecp&ac=share&type=album&id=$album[albumid]&handlekey=sharealbumhk_{$album[albumid]}" id="a_share" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr">{lang share}</a>
				<!--{/if}-->
				<div class="y">
					<!--{hook/space_album_op_extra}-->
					<!--{if $space[self]}--><a href="{if $album[albumid] > 0}home.php?mod=spacecp&ac=album&op=edit&albumid=$album[albumid]{else}home.php?mod=spacecp&ac=album&op=editpic&albumid=0{/if}">{lang edit}</a><span class="pipe">|</span><!--{/if}-->
					<!--{if ($_G[uid] == $album[uid] || checkperm('managealbum')) && $album[albumid] > 0}-->
						<a href="home.php?mod=spacecp&ac=album&op=delete&albumid=$album[albumid]&uid=$album[uid]&handlekey=delalbumhk_{$album[albumid]}" id="album_delete_$album[albumid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang delete}</a><span class="pipe">|</span>
					<!--{/if}-->
					<!--{if $_G[uid] != $album[uid]}-->
					<a href="javascript:;" onclick="showWindow('miscreport$album[albumid]', 'misc.php?mod=report&rtype=album&rid=$album[albumid]', 'get', -1);return false;">{lang report}</a><span class="pipe">|</span>
					<!--{/if}-->
				</div>
				<!--{if $album['catname']}-->
				<span class="xg1">{lang system_cat}</span><a href="home.php?mod=space&do=album&catid=$album[catid]&view=all">$album[catname]</a><span class="pipe">|</span>
				<!--{/if}-->
				<!--{if $album[picnum]}-->{lang total} $album[picnum] {lang album_pics}<!--{/if}-->
				<!--{if $album['friend']}-->
				<span class="xg1"> &nbsp; {$friendsname[$value[friend]]}</span>
				<!--{/if}-->
			</div>

		<!--{if $list}-->
			<ul class="ptw ml mlp cl">
			<!--{loop $list $key $value}-->
				<li>
				<a href="home.php?mod=space&uid=$value[uid]&do=$do&picid=$value[picid]"><!--{if $value[pic]}--><img src="$value[pic]" alt="" /><!--{/if}--></a><!--{if $value[status] == 1}--><b>({lang moderate_need})</b><!--{/if}-->
				</li>
			<!--{/loop}-->
			</ul>
			<!--{if $pricount}--><p>{lang hide_pic}</p><!--{/if}-->
			<!--{if $multi}--><div class="pgs cl mtm">$multi</div><!--{/if}-->
		<!--{else}-->
			<!--{if !$pricount}--><p class="emp">{lang no_pics}</p><!--{/if}-->
			<!--{if $pricount}--><p>{lang hide_pic}</p><!--{/if}-->
		<!--{/if}-->

<!--{if $albumlist}-->
<div class="bm mtm">
	<div class="bm_h cl">
		<!--{if $albumlist}-->
		<div class="y mtn">
				<a href="javascript:;" id="sabup" onclick="switchAlbum(0);this.blur();return false;" title="{lang previous_album}"><img src="{STATICURL}image/common/pic_nv_prev.gif" alt="{lang previous_album}"/></a> 
				<a href="javascript:;" id="sabdown" onclick="switchAlbum(1);this.blur();return false;" title="{lang next_album}"><img src="{STATICURL}image/common/pic_nv_next.gif" alt="{lang next_album}"/></a>
		</div>
		<!--{/if}-->
		<h2>{lang switch_pics}</h2>
	</div>
	<div class="bm_c">
		<div id="pnv" class="bn pns cl">
			<!--{if $albumlist}-->	
			<!--{loop $albumlist $key $ablums}-->
			<ul id="albumbox_$key" class="ptm ml mla mla1 z" {if !isset($ablums[$id]) && !($key==0 && $id<0)} style="display: none;"{else}{eval $nowalbum=$key;}{/if}>
				<!--{loop $ablums $akey $value}-->
				<!--{eval $pwdkey = 'view_pwd_album_'.$value['albumid'];}-->
				<li>
					<div class="c{if $value[albumid]==$id} a{/if}"><a href="home.php?mod=space&uid=$value[uid]&do=album&id=$value[albumid]" title="$value[albumname]" {if $value[uid]!=$_G[uid] && $value[friend]=='4' && $value[password] && empty($_G[cookie][$pwdkey])} onclick="showWindow('right_album_$value[albumid]', this.href, 'get', 0);"{/if}><!--{if $value[pic]}--><img src="$value[pic]" alt="$value[albumname]" /><!--{/if}--></a>
					</div>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{/loop}-->
			<script type="text/javascript">
				var nowAlbum = $nowalbum;
				var maxAlbum = $maxalbum;
				function switchAlbum(down) {
					if(down) {
						if(nowAlbum + 1 < maxAlbum) {
							$('albumbox_'+nowAlbum).style.display = 'none';
							nowAlbum++;
							$('albumbox_'+nowAlbum).style.display = '';
						}
					} else {
						if(nowAlbum - 1 >= 0) {
							$('albumbox_'+nowAlbum).style.display = 'none';
							nowAlbum--;
							$('albumbox_'+nowAlbum).style.display = '';
						}
					}
					initSwitchButton();
				}
				function initSwitchButton(){
					$('sabdown').style.display = maxAlbum-nowAlbum == 1 ? 'none' : '';
					$('sabup').style.display = nowAlbum ? '' : 'none';
				}
				window.onload = function () {initSwitchButton();}
			</script>
			<!--{/if}-->
		</div>
	</div>
</div>
<!--{/if}-->
		<!--[diy=diycontentbottom]--><div id="diycontentbottom" class="area"></div><!--[/diy]-->
		</div>
	</div>
<!--{if empty($diymode)}-->
	<div class="appl">
	<!--{if empty($diymode)}-->
			<!--{subtemplate common/userabout}-->
			<div class="drag">
				<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
			</div>

	<!--{/if}-->
	</div>
<!--{else}-->
</div>
	<div class="sd">
	<!--{subtemplate home/space_userabout}-->
	</div>
<!--{/if}-->

</div>

<!--{if empty($diymode)}-->
<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>
<!--{/if}-->

<!--{template common/footer}-->